

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import org.wizehack.mri.exception.InvalidFileExtensionException;
import org.wizehack.mri.exception.NotUsedException;
import org.wizehack.mri.test.BasicTestSuite;
import org.wizehack.mri.test.TestSuite;
import org.wizehack.mri.testSet.TestCaseReduction;
import org.wizehack.mri.testSet.VectorBasedStrategy;

public class VectorBasedStrategyTest {
	private static String ROOT_DIR = "/home/hsyoun/workspace/jgraphx/Data";
	private static String XML_DTD = "/home/hsyoun/workspace/jgraphx/Data/report.dtd";
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		TestSuite testSuite = new BasicTestSuite();
		TestCaseReduction strategy = new VectorBasedStrategy();
		
		String dir = ROOT_DIR + "/5";
		strategy.setDirectory(dir);
		strategy.setTestSuite(testSuite);
		
		List<String> failedCoverageFileList = new ArrayList<String>();
		String failedCoverageFile1 = "/home/hsyoun/workspace/jgraphx/Data/5/7.xml";
		String failedCoverageFile2 = "/home/hsyoun/workspace/jgraphx/Data/5/12.xml";
		String failedCoverageFile3 = "/home/hsyoun/workspace/jgraphx/Data/5/13.xml";
		failedCoverageFileList.add(failedCoverageFile1);
		failedCoverageFileList.add(failedCoverageFile2);
		failedCoverageFileList.add(failedCoverageFile3);
		strategy.setFailedCoverageFileList(failedCoverageFileList);
		
		String exportDir = dir + "_vectorbased";
		testSuite = strategy.select();
		
		try {
			strategy.exportTo(testSuite, exportDir, XML_DTD);
		} catch (InvalidFileExtensionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	

	}

}
